home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 443_01 / doc / info / cncl.info-2 < prev    next >
Encoding:
GNU Info File  |  1996-01-04  |  48.2 KB  |  1,955 lines

  1. This is Info file cncl.info, produced by Makeinfo-1.63 from the input
  2. file cncl.texi.
  3.  
  4.    This file documents the use of CNCL, the Communication Networks Class
  5. Library.
  6.  
  7.    Copyright (C) 1993-1996, Communication Networks.
  8.  
  9.    Permission is granted to make and distribute verbatim copies of this
  10. manual provided the copyright notice and this permission notice are
  11. preserved on all copies.
  12.  
  13.    Permission is granted to copy and distribute modified versions of
  14. this manual under the conditions for verbatim copying, provided that the
  15. entire resulting derived work is distributed under the terms of a
  16. permission notice identical to this one.
  17.  
  18.    Permission is granted to copy and distribute translations of this
  19. manual into other languages, under the above conditions for modified
  20. versions.
  21.  
  22. 
  23. File: cncl.info,  Node: CNDiracTab,  Next: CNDiscUniform,  Prev: CNDeterm,  Up: Random Numbers
  24.  
  25. CNDiracTab -- Distribution from Table of CDF
  26. ============================================
  27.  
  28. SYNOPSIS
  29. --------
  30.  
  31.    `#include <CNCL/DiracTab.h>'
  32.  
  33. TYPE
  34. ----
  35.  
  36.    `CN_DIRACTAB'
  37.  
  38. * Menu:
  39.  
  40. BASE CLASSES
  41. ------------
  42. * CNRandom::        Abstract Random Distribution Base Class
  43.  
  44. DERIVED CLASSES
  45. ---------------
  46.  
  47. RELATED CLASSES
  48. ---------------
  49. * CNRNG::        Abstract Random Number Generator Base Class
  50.  
  51. DESCRIPTION
  52. -----------
  53.  
  54.    `CNDiracTab' generates random numbers according to a table with the
  55. distribution function.
  56.  
  57.    Constructors:
  58.  
  59. `CNDiracTab();'
  60. `CNDiracTab(CNParam *param);'
  61. `CNDiracTab(CNDiracTabEntry *tab, long length, CNRNG *gen);'
  62.      Initializes a `CNDiracTab' distribution with a base random number
  63.      generator `gen' and a table `tab' with length `length'.
  64.  
  65.      Example:
  66.  
  67.           CNDiracTabEntry datafield[] = {{ 0.1, 2 },{ 0.3, 4 }, { 0.6, 6 }};
  68.           CNDiracTab example(datafield, 3, &generator);
  69.  
  70.    In addition to the member functions required by CNCL, `CNDiracTab'
  71. provides:
  72.  
  73. `virtual double operator() ();'
  74.      Draws a random number.
  75.  
  76. 
  77. File: cncl.info,  Node: CNDiscUniform,  Next: CNErlang,  Prev: CNDiracTab,  Up: Random Numbers
  78.  
  79. CNDiscUniform -- Discrete Uniform Distribution
  80. ==============================================
  81.  
  82. SYNOPSIS
  83. --------
  84.  
  85.    `#include <CNCL/DiscUniform.h>'
  86.  
  87. TYPE
  88. ----
  89.  
  90.    `CN_DISCUNIFORM'
  91.  
  92. * Menu:
  93.  
  94. BASE CLASSES
  95. ------------
  96. * CNRandom::        Abstract Random Distribution Base Class
  97.  
  98. DERIVED CLASSES
  99. ---------------
  100.  
  101. RELATED CLASSES
  102. ---------------
  103. * CNRNG::        Abstract Random Number Generator Base Class
  104.  
  105. DESCRIPTION
  106. -----------
  107.  
  108.    `CNDiscUniform' is a discrete uniform distribution with interval
  109. limits `low' and `high'. It generates discrete (i.e. integer) values.
  110.  
  111.    Constructors:
  112.  
  113. `CNDiscUniform();'
  114. `CNDiscUniform(CNParam *param);'
  115. `CNDiscUniform(long low, long high, CNRNG *gen);'
  116.      Initializes a `CNDiscUniform' distribution with a base random
  117.      number generator `gen' and the parameters `low' and `high'.
  118.  
  119.    In addition to the member functions required by CNCL, `CNDiscUniform'
  120. provides:
  121.  
  122. `long low();'
  123. `long low(long x);'
  124. `long high();'
  125. `long high(long x);'
  126.      Gets/sets the values for the interval limits.
  127.  
  128. `virtual double operator() ();'
  129.      Draws a discrete uniform distributed random number.
  130.  
  131. 
  132. File: cncl.info,  Node: CNErlang,  Next: CNGeometric,  Prev: CNDiscUniform,  Up: Random Numbers
  133.  
  134. CNErlang -- Erlang-k Distribution
  135. =================================
  136.  
  137. SYNOPSIS
  138. --------
  139.  
  140.    `#include <CNCL/Erlang.h>'
  141.  
  142. TYPE
  143. ----
  144.  
  145.    `CN_ERLANG'
  146.  
  147. * Menu:
  148.  
  149. BASE CLASSES
  150. ------------
  151. * CNRandom::        Abstract Random Distribution Base Class
  152.  
  153. DERIVED CLASSES
  154. ---------------
  155.  
  156. RELATED CLASSES
  157. ---------------
  158. * CNRNG::        Abstract Random Number Generator Base Class
  159.  
  160. DESCRIPTION
  161. -----------
  162.  
  163.    `CNErlang' is a class for generating Erlang-k distributed random
  164. numbers.
  165.  
  166.    Constructors:
  167.  
  168. `CNErlang();'
  169. `CNErlang(CNParam *param);'
  170. `CNErlang(double mean, double variance, CNRNG *gen);'
  171.      Initializes a `CNErlang' distribution with a base random number
  172.      generator `gen', mean value `mean', and variance `variance'.
  173.  
  174.    In addition to the member functions required by CNCL, `CNErlang'
  175. provides:
  176.  
  177. `double mean();'
  178. `double mean(double x);'
  179. `double variance();'
  180. `double variance(double x);'
  181.      Gets/sets the values for mean and variance.
  182.  
  183. `virtual double operator() ();'
  184.      Draws a Erlang-k distributed random number.
  185.  
  186. 
  187. File: cncl.info,  Node: CNGeometric,  Next: CNHyperExp,  Prev: CNErlang,  Up: Random Numbers
  188.  
  189. CNGeometric -- Geometric Distributed Random Numbers
  190. ===================================================
  191.  
  192. SYNOPSIS
  193. --------
  194.  
  195.    `#include <CNCL/Geometric.h>'
  196.  
  197. TYPE
  198. ----
  199.  
  200.    `CN_GEOMETRIC'
  201.  
  202. * Menu:
  203.  
  204. BASE CLASSES
  205. ------------
  206. * CNRandom::        Abstract Random Distribution Base Class
  207.  
  208. DERIVED CLASSES
  209. ---------------
  210.  
  211. RELATED CLASSES
  212. ---------------
  213. * CNRNG::        Abstract Random Number Generator Base Class
  214.  
  215. DESCRIPTION
  216. -----------
  217.  
  218.    `CNGeometric' is a class for generating geometric distributed random
  219. numbers.
  220.  
  221.    Constructors:
  222.  
  223. `CNGeometric();'
  224. `CNGeometric(CNParam *param);'
  225. `CNGeometric(double mean, CNRNG *gen);'
  226.      Initializes a `CNGeometric' distribution with a base random number
  227.      generator `gen' and the value `mean' as a parameter for the random
  228.      generator.
  229.  
  230.      NOTE: Please do NOT take this parameter as the distrbution`s mean
  231.      (`MEAN`) value. This can be calculated as:
  232.             MEAN = 1 / ( 1 - `mean' )
  233.  
  234.    In addition to the member functions required by CNCL, `CNGeometric'
  235. provides:
  236.  
  237. `double mean();'
  238. `double mean(double x);'
  239.      Gets/sets the values for mean.
  240.  
  241. `virtual double operator() ();'
  242.      Draws a geometric distributed random number.
  243.  
  244. 
  245. File: cncl.info,  Node: CNHyperExp,  Next: CNHyperGeom,  Prev: CNGeometric,  Up: Random Numbers
  246.  
  247. CNHyperExp -- Hyperexponential Distribution
  248. ===========================================
  249.  
  250. SYNOPSIS
  251. --------
  252.  
  253.    `#include <CNCL/HyperExp.h>'
  254.  
  255. TYPE
  256. ----
  257.  
  258.    `CN_HYPEREXP'
  259.  
  260. * Menu:
  261.  
  262. BASE CLASSES
  263. ------------
  264. * CNRandom::        Abstract Random Distribution Base Class
  265.  
  266. DERIVED CLASSES
  267. ---------------
  268.  
  269. RELATED CLASSES
  270. ---------------
  271. * CNRNG::        Abstract Random Number Generator Base Class
  272.  
  273. DESCRIPTION
  274. -----------
  275.  
  276.    `CNHyperExp' is a class for generating hyperexponential distributed
  277. random numbers. `CNHyperExp' is a mixed distribution of two negative
  278. exponential distributions (H2).
  279.  
  280.    Constructors:
  281.  
  282. `CNHyperExp();'
  283. `CNHyperExp(CNParam *param);'
  284. `CNHyperExp(double p, double m1, double m2, CNRNG *gen);'
  285.      Initializes a `CNHyperExp' distribution with a base random number
  286.      generator `gen', the mixprobability `p' and the intensity
  287.      parameters `m1' and `m2'.
  288.  
  289.    In addition to the member functions required by CNCL, `CNHyperExp'
  290. provides:
  291.  
  292. `virtual double operator() ();'
  293.      Draws a hyperexponential  distributed random number.
  294.  
  295. 
  296. File: cncl.info,  Node: CNHyperGeom,  Next: CNInterTab,  Prev: CNHyperExp,  Up: Random Numbers
  297.  
  298. CNHyperGeom -- Hypergeometrical Distribution
  299. ============================================
  300.  
  301. SYNOPSIS
  302. --------
  303.  
  304.    `#include <CNCL/HyperGeom.h>'
  305.  
  306. TYPE
  307. ----
  308.  
  309.    `CN_HYPERGEOM'
  310.  
  311. * Menu:
  312.  
  313. BASE CLASSES
  314. ------------
  315. * CNRandom::        Abstract Random Distribution Base Class
  316.  
  317. DERIVED CLASSES
  318. ---------------
  319.  
  320. RELATED CLASSES
  321. ---------------
  322. * CNRNG::        Abstract Random Number Generator Base Class
  323.  
  324. DESCRIPTION
  325. -----------
  326.  
  327.    `CNHyperGeom' is a class for generating hypergeometrical distributed
  328. random numbers.
  329.  
  330.    Constructors:
  331.  
  332. `CNHyperGeom();'
  333. `CNHyperGeom(CNParam *param);'
  334. `CNHyperGeom(double mean, double variance, CNRNG *gen);'
  335.      Initializes a `CNHyperGeom' distribution with a base random number
  336.      generator `gen', mean value `mean' and variance `variance'.
  337.  
  338.    In addition to the member functions required by CNCL, `CNHyperGeom'
  339. provides:
  340.  
  341. `double mean();'
  342. `double mean(double x);'
  343. `double variance();'
  344. `double variance(double x);'
  345.      Gets/sets the values for mean and variance.
  346.  
  347. `virtual double operator() ();'
  348.      Draws a hypergeometrical distributed random number.
  349.  
  350. 
  351. File: cncl.info,  Node: CNInterTab,  Next: CNLogNormal,  Prev: CNHyperGeom,  Up: Random Numbers
  352.  
  353. CNInterTab - Distribution from Table of CDF (Interpolated)
  354. ==========================================================
  355.  
  356. SYNOPSIS
  357. --------
  358.  
  359.    `#include <CNCL/InterTab.h>'
  360.  
  361. TYPE
  362. ----
  363.  
  364.    `CN_INTERTAB'
  365.  
  366. * Menu:
  367.  
  368. BASE CLASSES
  369. ------------
  370. * CNTab::                 Derived  Class form Random
  371.  
  372. DERIVED CLASSES
  373. ---------------
  374.  
  375. RELATED CLASSES
  376. ---------------
  377. * CNRNG::        Abstract Random Number Generator Base Class
  378.  
  379. DESCRIPTION
  380. -----------
  381.  
  382.    `CNInterTab' is a class for generating random numbers from a table.
  383. It works as `CNTab', but the values are interpolated between the table
  384. entries.
  385.  
  386.    Constructors:
  387.  
  388. `CNInterTab();'
  389. `CNInterTab(CNParam *param);'
  390. `CNInterTab(double *tab, long length, CNRNG *gen);'
  391.      Initializes a `CNInterTab' distribution with a base random number
  392.      generator `gen', a table with the samples `tab' and the length of
  393.      the table `length'.
  394.  
  395.      Example:
  396.  
  397.           double datafield[]={ 2, 4, 6, 8, 10, 12 };
  398.           CNInterTab ex(datafield, 6, generator);
  399.  
  400.    In addition to the member functions required by CNCL, `CNInterTab'
  401. provides:
  402.  
  403. `virtual double operator() ();'
  404.      Draws a random number.
  405.  
  406. 
  407. File: cncl.info,  Node: CNLogNormal,  Next: CNMDeterm,  Prev: CNInterTab,  Up: Random Numbers
  408.  
  409. CNLogNormal -- Log-normal Distribution
  410. ======================================
  411.  
  412. SYNOPSIS
  413. --------
  414.  
  415.    `#include <CNCL/LogNormal.h>'
  416.  
  417. TYPE
  418. ----
  419.  
  420.    `CN_LOGNORMAL'
  421.  
  422. * Menu:
  423.  
  424. BASE CLASSES
  425. ------------
  426. * CNNormal::        CNNormal Distribution Base Class
  427.  
  428. DERIVED CLASSES
  429. ---------------
  430.  
  431. RELATED CLASSES
  432. ---------------
  433. * CNRNG::        Abstract Random Number Generator Base Class
  434.  
  435. DESCRIPTION
  436. -----------
  437.  
  438.    `CNLogNormal' is a class for generating logarithmic normal
  439. distributed random numbers.
  440.  
  441.    Constructors:
  442.  
  443. `CNLogNormal();'
  444. `CNLogNormal(CNParam *param);'
  445. `CNLogNormal(double mean, double variance, CNRNG *gen);'
  446.      Initializes a `CNLogNormal' distribution with a base random number
  447.      generator `gen', mean value `mean' and variance `variance'.
  448.  
  449.    In addition to the member functions required by CNCL, `CNLogNormal'
  450. provides:
  451.  
  452. `double mean();'
  453. `double mean(double x);'
  454. `double variance();'
  455. `double variance(double x);'
  456.      Gets/sets the values for mean and variance.
  457.  
  458. `virtual double operator() ();'
  459.      Draws a logarithmic normal distributed random number.
  460.  
  461. 
  462. File: cncl.info,  Node: CNMDeterm,  Next: CNNegExp,  Prev: CNLogNormal,  Up: Random Numbers
  463.  
  464. CNMDeterm -- Random Mix of Deterministic Values
  465. ===============================================
  466.  
  467. SYNOPSIS
  468. --------
  469.  
  470.    `#include <CNCL/MDeterm.h>'
  471.  
  472. TYPE
  473. ----
  474.  
  475.    `CN_MDETERM'
  476.  
  477. * Menu:
  478.  
  479. BASE CLASSES
  480. ------------
  481. * CNRandom::        Abstract Random Distribution Base Class
  482.  
  483. DERIVED CLASSES
  484. ---------------
  485.  
  486. RELATED CLASSES
  487. ---------------
  488. * CNRNG::        Abstract Random Number Generator Base Class
  489.  
  490. DESCRIPTION
  491. -----------
  492.  
  493.    `CNMDeterm' is a class for generating a random mix of two
  494. deterministic values.
  495.  
  496.    Constructors:
  497.  
  498. `CNMDeterm();'
  499. `CNMDeterm(CNParam *param);'
  500. `CNMDeterm(double m, double d1, double d2, CNRNG *gen);'
  501.      Initializes a `CNMDeterm' distribution with a base random number
  502.      generator `gen', a mixing parameter `m' and two values `d1' and
  503.      `d2'.
  504.  
  505.    In addition to the member functions required by CNCL, `CNMDeterm'
  506. provides:
  507.  
  508. `virtual double operator() ();'
  509.      Draws a random number.
  510.  
  511. 
  512. File: cncl.info,  Node: CNNegExp,  Next: CNNormal,  Prev: CNMDeterm,  Up: Random Numbers
  513.  
  514. CNNegExp -- Negative Exponential Distribution
  515. =============================================
  516.  
  517. SYNOPSIS
  518. --------
  519.  
  520.    `#include <CNCL/NegExp.h>'
  521.  
  522. TYPE
  523. ----
  524.  
  525.    `CN_NEGEXP'
  526.  
  527. * Menu:
  528.  
  529. BASE CLASSES
  530. ------------
  531. * CNRandom::        Abstract Random Distribution Base Class
  532.  
  533. DERIVED CLASSES
  534. ---------------
  535.  
  536. RELATED CLASSES
  537. ---------------
  538. * CNRNG::        Abstract Random Number Generator Base Class
  539.  
  540. DESCRIPTION
  541. -----------
  542.  
  543.    `CNNegExp' is a class for generating negative exponential distributed
  544. random numbers.
  545.  
  546.    Constructors:
  547.  
  548. `CNNegExp();'
  549. `CNNegExp(CNParam *param);'
  550. `CNNegExp(double mean, CNRNG *gen);'
  551.      Initializes a `CNNegExp' distribution with a base random number
  552.      generator `gen' and mean value `mean'.
  553.  
  554.    In addition to the member functions required by CNCL, `CNNegExp'
  555. provides:
  556.  
  557. `double mean();'
  558. `double mean(double x);'
  559.      Gets/sets the values for mean.
  560.  
  561. `virtual double operator() ();'
  562.      Draws a negative exponential distributed random number.
  563.  
  564. 
  565. File: cncl.info,  Node: CNNormal,  Next: CNPoisson,  Prev: CNNegExp,  Up: Random Numbers
  566.  
  567. CNNormal -- Normal Distribution
  568. ===============================
  569.  
  570. SYNOPSIS
  571. --------
  572.  
  573.    `#include <CNCL/Normal.h>'
  574.  
  575. TYPE
  576. ----
  577.  
  578.    `CN_NORMAL'
  579.  
  580. * Menu:
  581.  
  582. BASE CLASSES
  583. ------------
  584. * CNRandom::        Abstract Random Distribution Base Class
  585.  
  586. DERIVED CLASSES
  587. ---------------
  588. * CNLogNormal::         LogNormal Distribution
  589. * CNRayleigh::        Rayleigh Distributed Random Numbers
  590. * CNRice::        Rice Distributed Random Numbers
  591.  
  592. RELATED CLASSES
  593. ---------------
  594. * CNRNG::        Abstract Random Number Generator Base Class
  595.  
  596. DESCRIPTION
  597. -----------
  598.  
  599.    `CNNormal' is a class for generating normal (Gaussian) distributed
  600. random numbers.
  601.  
  602.    Constructors:
  603.  
  604. `CNNormal();'
  605. `CNNormal(CNParam *param);'
  606. `CNNormal(double mean, double variance, CNRNG *gen);'
  607.      Initializes a `CNNormal' distribution with a base random number
  608.      generator `gen', mean value `mean' and variance `variance'.
  609.  
  610.    In addition to the member functions required by CNCL, `CNNormal'
  611. provides:
  612.  
  613. `double mean();'
  614. `double mean(double x);'
  615. `double variance();'
  616. `double variance(double x);'
  617.      Gets/sets the values for mean and variance.
  618.  
  619. `virtual double operator() ();'
  620.      Draws a normal distributed random number.
  621.  
  622. 
  623. File: cncl.info,  Node: CNPoisson,  Next: CNRandomMix,  Prev: CNNormal,  Up: Random Numbers
  624.  
  625. CNPoisson -- Poisson Distribution
  626. =================================
  627.  
  628. SYNOPSIS
  629. --------
  630.  
  631.    `#include <CNCL/Poisson.h>'
  632.  
  633. TYPE
  634. ----
  635.  
  636.    `CN_POISSON'
  637.  
  638. * Menu:
  639.  
  640. BASE CLASSES
  641. ------------
  642. * CNRandom::        Abstract Random Distribution Base Class
  643.  
  644. DERIVED CLASSES
  645. ---------------
  646.  
  647. RELATED CLASSES
  648. ---------------
  649. * CNRNG::        Abstract Random Number Generator Base Class
  650.  
  651. DESCRIPTION
  652. -----------
  653.  
  654.    `CNPoisson' is a class for generating Poisson distributed random
  655. numbers.
  656.  
  657.    Constructors:
  658.  
  659. `CNPoisson();'
  660. `CNPoisson(CNParam *param);'
  661. `CNPoisson(double mean, CNRNG *gen);'
  662.      Initializes a `CNPoisson' distribution with a base random number
  663.      generator `gen' and mean value `mean'.
  664.  
  665.    In addition to the member functions required by CNCL, `CNPoisson'
  666. provides:
  667.  
  668. `double mean();'
  669. `double mean(double x);'
  670.      Gets/sets the values for mean.
  671.  
  672. `virtual double operator() ();'
  673.      Draws a Poisson distributed random number.
  674.  
  675. 
  676. File: cncl.info,  Node: CNRandomMix,  Next: CNRayleigh,  Prev: CNPoisson,  Up: Random Numbers
  677.  
  678. CNRandomMix -- Mix of Several `CNRandom' Distributions
  679. ======================================================
  680.  
  681. SYNOPSIS
  682. --------
  683.  
  684.    `#include <CNCL/RandomMix.h>'
  685.  
  686. TYPE
  687. ----
  688.  
  689.    `CN_RANDOMMIX'
  690.  
  691. * Menu:
  692.  
  693. BASE CLASSES
  694. ------------
  695. * CNRandom::        Abstract Random Distribution Base Class
  696.  
  697. DERIVED CLASSES
  698. ---------------
  699.  
  700. RELATED CLASSES
  701. ---------------
  702. * CNRNG::        Abstract Random Number Generator Base Class
  703.  
  704. DESCRIPTION
  705. -----------
  706.  
  707.    `CNRandomMix' generates random numbers from a mix of several
  708. `CNRandom' distributions.
  709.  
  710.    Constructors:
  711.  
  712. `CNRandomMix();'
  713. `CNRandomMix(CNParam *param);'
  714. `CNRandomMix(CNRandomMixEntry *tab, int length, CNRNG *gen);'
  715.      Initializes a `CNRandomMix' distribution with a base random number
  716.      generator `gen' and a table of several distributions.
  717.  
  718.      The following example shows how to use a `CNRandomMixEntry' table
  719.      with 3 different distributions and their corresponding
  720.      probabilities for a `CNRandomMix' distribution:
  721.  
  722.           CNLogNormal ex1(10, 0.5, &generator1);
  723.           CNNormal    ex2(12, 0.3, &generator2);
  724.           CNHyperExp  ex3(10, 0.5, &generator3);
  725.           
  726.           CNRandomMixEntry tab[] = {
  727.               { 0.1, &ex1 }, { 0.5, &ex2 }, { 0.4 &ex3 }
  728.           };
  729.           
  730.           CNRandomMix ex(tab, 3, &generator);
  731.  
  732.    In addition to the member functions required by CNCL, `CNRandomMix'
  733. provides:
  734.  
  735. `virtual double operator() ();'
  736.      Draws a random number.
  737.  
  738. 
  739. File: cncl.info,  Node: CNRayleigh,  Next: CNRice,  Prev: CNRandomMix,  Up: Random Numbers
  740.  
  741. CNRayleigh -- Rayleigh Distribution
  742. ===================================
  743.  
  744. SYNOPSIS
  745. --------
  746.  
  747.    `#include <CNCL/Rayleigh.h>'
  748.  
  749. TYPE
  750. ----
  751.  
  752.    `CN_RAYLEIGH'
  753.  
  754. * Menu:
  755.  
  756. BASE CLASSES
  757. ------------
  758. * CNNormal::        CNNormal Distribution Base Class
  759.  
  760. DERIVED CLASSES
  761. ---------------
  762. RELATED CLASSES
  763. ---------------
  764. * CNRNG::        Abstract Random Number Generator Base Class
  765.  
  766. DESCRIPTION
  767. -----------
  768.  
  769.    `CNRayleigh' is a class for generating Rayleigh distributed random
  770. numbers.
  771.  
  772.    Constructors:
  773.  
  774. `CNRayleigh();'
  775. `CNRayleigh(CNParam *param);'
  776. `CNRayleigh(double variance, CNRNG *gen);'
  777.      Initializes a `CNRayleigh' distribution with a base random number
  778.      generator `gen' and  variance `variance'.
  779.  
  780.      The variance is the one passed to the `CNNormal' base class, not
  781.      the actual value of the Rayleigh distribution.
  782.  
  783.    In addition to the member functions required by CNCL, `CNRayleigh'
  784. provides:
  785.  
  786. `virtual double operator() ();'
  787.      Draws a Rayleigh distributed random number.
  788.  
  789. 
  790. File: cncl.info,  Node: CNRice,  Next: CNTab,  Prev: CNRayleigh,  Up: Random Numbers
  791.  
  792. CNRice -- Rice Distribution
  793. ===========================
  794.  
  795. SYNOPSIS
  796. --------
  797.  
  798.    `#include <CNCL/Rice.h>'
  799.  
  800. TYPE
  801. ----
  802.  
  803.    `CN_RICE'
  804.  
  805. * Menu:
  806.  
  807. BASE CLASSES
  808. ------------
  809. * CNNormal::        CNNormal Distribution Base Class
  810.  
  811. DERIVED CLASSES
  812. ---------------
  813. RELATED CLASSES
  814. ---------------
  815. * CNRNG::        Abstract Random Number Generator Base Class
  816.  
  817. DESCRIPTION
  818. -----------
  819.  
  820.    `CNRice' is a class for generating Rice distributed random numbers.
  821.  
  822.    Constructors:
  823.  
  824. `CNRice();'
  825. `CNRice(CNParam *param);'
  826. `CNRice(double mean, double variance, CNRNG *gen);'
  827.      Initializes a `CNRice' distribution with a base random number
  828.      generator `gen', mean value `mean' and variance `variance'.
  829.  
  830.      The mean value and variance are those passed to the `CNNormal' base
  831.      class, not the actual values of the Rice distribution.
  832.  
  833.    In addition to the member functions required by CNCL, `CNRice'
  834. provides:
  835.  
  836. `virtual double operator() ();'
  837.      Draws a Rice distributed random number.
  838.  
  839. 
  840. File: cncl.info,  Node: CNTab,  Next: CNUniform,  Prev: CNRice,  Up: Random Numbers
  841.  
  842. CNTab -- Distribution from Table of CDF
  843. =======================================
  844.  
  845. SYNOPSIS
  846. --------
  847.  
  848.    `#include <CNCL/Tab.h>'
  849.  
  850. TYPE
  851. ----
  852.  
  853.    `CN_TAB'
  854.  
  855. * Menu:
  856.  
  857. BASE CLASSES
  858. ------------
  859. * CNRandom::        Abstract Random Distribution Base Class
  860.  
  861. DERIVED CLASSES
  862. ---------------
  863. * CNInterTab::        Distribution from Table (Interpolated)
  864.  
  865. RELATED CLASSES
  866. ---------------
  867. * CNRNG::        Abstract Random Number Generator Base Class
  868.  
  869. DESCRIPTION
  870. -----------
  871.  
  872.    `CNTab' requires a table with  samples.
  873.  
  874.    Constructors:
  875.  
  876. `CNTab();'
  877. `CNTab(CNParam *param);'
  878. `CNTab(double *tab, long length, CNRNG *gen);'
  879.      Initializes a `CNTab' distribution with a base random number
  880.      generator `gen', a table of values `tab', and length `length'.
  881.  
  882.      Example:
  883.  
  884.           double datafield[]={ 2, 4, 6, 8, 10, 12 };
  885.           CNTab ex(datafield, 6, &generator);
  886.  
  887.    In addition to the member functions required by CNCL, `CNTab'
  888. provides:
  889.  
  890. `virtual double operator() ();'
  891.      Draws a random number.
  892.  
  893. 
  894. File: cncl.info,  Node: CNUniform,  Next: CNWeibull,  Prev: CNTab,  Up: Random Numbers
  895.  
  896. CNUniform -- Uniform Distribution
  897. =================================
  898.  
  899. SYNOPSIS
  900. --------
  901.  
  902.    `#include <CNCL/Uniform.h>'
  903.  
  904. TYPE
  905. ----
  906.  
  907.    `CN_UNIFORM'
  908.  
  909. * Menu:
  910.  
  911. BASE CLASSES
  912. ------------
  913. * CNRandom::        Abstract Random Distribution Base Class
  914.  
  915. DERIVED CLASSES
  916. ---------------
  917.  
  918. RELATED CLASSES
  919. ---------------
  920. * CNRNG::        Abstract Random Number Generator Base Class
  921.  
  922. DESCRIPTION
  923. -----------
  924.  
  925.    `CNUniform' generates uniform distributed random numbers within the
  926. interval limits `low' and `high'.
  927.  
  928.    Constructors:
  929.  
  930. `CNUniform();'
  931. `CNUniform(CNParam *param);'
  932. `CNUniform(double low, double high, CNRNG *gen);'
  933.      Initializes a `CNUniform' distribution with a base random number
  934.      generator `gen' and interval limits `low' and `high'.
  935.  
  936.    In addition to the member functions required by CNCL, `CNUniform'
  937. provides:
  938.  
  939. `double low();'
  940. `double low(double x);'
  941. `double high();'
  942. `double high(double x);'
  943.      Gets/sets the values for the limits.
  944.  
  945. `virtual double operator() ();'
  946.      Draws a uniform distributed random number.
  947.  
  948. 
  949. File: cncl.info,  Node: CNWeibull,  Next: CNStatistics,  Prev: CNUniform,  Up: Random Numbers
  950.  
  951. CNWeibull -- Weibull Distribution
  952. =================================
  953.  
  954. SYNOPSIS
  955. --------
  956.  
  957.    `#include <CNCL/Weibull.h>'
  958.  
  959. TYPE
  960. ----
  961.  
  962.    `CN_WEIBULL'
  963.  
  964. * Menu:
  965.  
  966. BASE CLASSES
  967. ------------
  968. * CNRandom::        Abstract Random Distribution Base Class
  969.  
  970. DERIVED CLASSES
  971. ---------------
  972.  
  973. RELATED CLASSES
  974. ---------------
  975. * CNRNG::        Abstract Random Number Generator Base Class
  976.  
  977. DESCRIPTION
  978. -----------
  979.  
  980.    `CNWeibull' generates Weibull distributed random numbers with a form
  981. factor `alpha' and a scale factor `beta'.
  982.  
  983.    Constructors:
  984.  
  985. `CNWeibull();'
  986. `CNWeibull(CNParam *param);'
  987. `CNWeibull(double alpha, double beta, CNRNG *gen);'
  988.      Initializes a `CNWeibull' distribution with a base random number
  989.      generator `gen' and parameters `alpha' and `beta'.
  990.  
  991.    In addition to the member functions required by CNCL, `CNWeibull'
  992. provides:
  993.  
  994. `double alpha();'
  995. `double alpha(double x);'
  996. `double beta();'
  997. `double beta(double x);'
  998.      Gets/sets the values for alpha and beta.
  999.  
  1000. `virtual double operator() ();'
  1001.      Draws a Weibull distributed random number.
  1002.  
  1003. 
  1004. File: cncl.info,  Node: Evaluation,  Next: Container,  Prev: Random Numbers,  Up: Top
  1005.  
  1006. Statistical Evaluation in CNCL
  1007. ******************************
  1008.  
  1009.    CNCL provides essentially five methods for a statistical evaluation
  1010. of simulation results:
  1011.  
  1012.    * Moments: mean, variance, coefficient of variation etc., without
  1013.      error measure (`CNMoments')
  1014.  
  1015.    * Moments with Time Weights: mean, variance, coefficient of variation
  1016.      etc., without error measure (`CNMomentsTime')
  1017.  
  1018.    * Limited-Relative-Error (LRE): distribution function, complementary
  1019.      distributio function, and local correlation coefficient with error
  1020.      measure (`CNLREF', `CNLREG')
  1021.  
  1022.    * Discrete-Limited-Relative-Error (DLRE): same as LRE, but only for
  1023.      discrete (complementary) distribution functions with well-known
  1024.      x-values
  1025.  
  1026.    * Batch-Means: distribution function with relative Bayes error,
  1027.      histogram, confidence interval; mean (with relative Bayes error)
  1028.      and variance of the group means (`CNBatchMeans').
  1029.  
  1030.    All classes are derived from the base class `CNStatistics'.
  1031.  
  1032. * Menu:
  1033.  
  1034. * CNStatistics::        Abstract Statistics Base Class
  1035. * CNMoments::           Moments Evaluation
  1036. * CNMomentsTime::       Moments Evaluation with Time Weights
  1037. * CNLRE::               Evaluation by LRE
  1038. * CNDLRE::              Evaluation by DLRE
  1039. * CNBatchMeans::        Evaluation by Batch Means
  1040.  
  1041. 
  1042. File: cncl.info,  Node: CNStatistics,  Next: CNMoments,  Prev: CNWeibull,  Up: Evaluation
  1043.  
  1044. CNStatistics -- Abstract Statistics Base Class
  1045. ==============================================
  1046.  
  1047. SYNOPSIS
  1048. --------
  1049.  
  1050.    `#include <CNCL/Statistics.h>'
  1051.  
  1052. TYPE
  1053. ----
  1054.  
  1055.    `CN_STATISTICS'
  1056.  
  1057. * Menu:
  1058.  
  1059. BASE CLASSES
  1060. ------------
  1061. * CNObject::            Root of the CNCL Hierarchy
  1062.  
  1063. DERIVED CLASSES
  1064. ---------------
  1065. * CNMoments::           Calculation of Mean, Variance, Deviation ...
  1066. * CNLRE::               Evaluation by the Limited-Relative-Error Method
  1067. * CNDLRE::              Evaluation by discrete LRE Method
  1068. * CNBatchMeans::        Evaluation By Batch Means Method
  1069.  
  1070. RELATED CLASSES
  1071. ---------------
  1072.  
  1073. DESCRIPTION
  1074. -----------
  1075.  
  1076.    `CNStatistics' is the base class of all statistics classes. It
  1077. defines the common interface.
  1078.  
  1079.    Constructors:
  1080.  
  1081. `CNStatistics();'
  1082. `CNStatistics( CNParam *param );'
  1083.      Initializes `CNStatistics'.
  1084.  
  1085.    The evaluation phases and types supported by `CNStatistics' are:
  1086.  
  1087. `enum Phase { INITIALIZE=0, ITERATE=1, END=2 };'
  1088.      Different phases of a statistical evaluation with their settings.
  1089.  
  1090. `enum Type { DF=0, CDF=1, PF=2 };'
  1091.      `DF' as distribution function, `CDF' as complementary distribution
  1092.      function and `PF' as probability function.
  1093.  
  1094.    In addition to the member functions required by CNCL, `CNStatistics'
  1095. provides:
  1096.  
  1097. `virtual void put( double ) = 0;'
  1098.      Input of a value for statistical evaluation.
  1099.  
  1100. `virtual double mean() const = 0;'
  1101.      Returns the mean value of the input sequence.
  1102.  
  1103. `virtual double variance() const = 0;'
  1104.      Returns the variance of the input sequence.
  1105.  
  1106. `virtual long trials() const = 0;'
  1107.      Returns the number of evaluated values.
  1108.  
  1109. `virtual double min() const = 0;'
  1110.      Returns the minimum of all evaluated values.
  1111.  
  1112. `virtual double max() const = 0;'
  1113.      Returns the maximum of all evaluated values.
  1114.  
  1115. `virtual bool end() const = 0;'
  1116.      Returns `TRUE' if end of evaluation is reached else `FALSE'.
  1117.      NOTE: In case of a `CNMoments' evaluation, the return value is
  1118.      always `FALSE'.
  1119.  
  1120. `virtual void reset() = 0;'
  1121.      Resets the evaluation.
  1122.  
  1123. `virtual Phase status() const = 0;'
  1124.      Returns the state of evaluation;
  1125.  
  1126. 
  1127. File: cncl.info,  Node: CNMoments,  Next: CNMomentsTime,  Prev: CNStatistics,  Up: Evaluation
  1128.  
  1129. CNMoments -- Moments Evaluation
  1130. ===============================
  1131.  
  1132. SYNOPSIS
  1133. --------
  1134.  
  1135.    `#include <CNCL/Moments.h>'
  1136.  
  1137. TYPE
  1138. ----
  1139.  
  1140.    `CN_MOMENTS'
  1141.  
  1142. * Menu:
  1143.  
  1144. BASE CLASSES
  1145. ------------
  1146. * CNStatistics::        Base Class of Statistic Classes
  1147.  
  1148. DERIVED CLASSES
  1149. ---------------
  1150.  
  1151. RELATED CLASSES
  1152. ---------------
  1153. * CNMomentsTime::       Moments Evaluation with Time Weights
  1154.  
  1155. DESCRIPTION
  1156. -----------
  1157.  
  1158.    The `CNMoments' class yields the moments of an input sequence:
  1159.  
  1160.    * mean,
  1161.  
  1162.    * variance and relative variance (squared coefficient of variation),
  1163.  
  1164.    * 2nd and 3rd zero moment,
  1165.  
  1166.    * 3rd central moment,
  1167.  
  1168.    * deviation and relative deviation (coefficient of variation),
  1169.  
  1170.    * skewness.
  1171.  
  1172.    Constructors:
  1173.  
  1174. `CNMoments( CNParam *param )'
  1175. `CNMoments( char *new_name = "no name" )'
  1176.      Initializes a `CNMoments' evaluation with `new_name' as name of
  1177.      evaluation.
  1178.  
  1179.    In addition to the member functions required by CNCL and
  1180. `CNStatistics', `CNMoments' provides:
  1181.  
  1182. `virtual void put( double x_i, double w_i);'
  1183.      Input of a weighted value `x_i' for statistical evaluation. If no
  1184.      weight `w_i' is specified, `1.0' is used as a default value.
  1185.  
  1186. `virtual double mean() const;'
  1187.      Returns mean of the input values.
  1188.  
  1189. `double variance() const;'
  1190.      Returns variance.
  1191.  
  1192. `double M_2() const;'
  1193.      Returns 2nd moment.
  1194.  
  1195. `double M_3() const;'
  1196.      Returns 3rd moment.
  1197.  
  1198. `double Z_3() const;'
  1199.      Returns 3rd central moment.
  1200.  
  1201. `double skewness() const;'
  1202.      Returns skewness.
  1203.  
  1204. `double relative_variance() const;'
  1205.      Returns relative variance (squared coefficient of variation).
  1206.  
  1207. `double relative_deviation() const;'
  1208.      Returns relative deviation (coefficient of variation).
  1209.  
  1210. 
  1211. File: cncl.info,  Node: CNMomentsTime,  Next: CNLRE,  Prev: CNMoments,  Up: Evaluation
  1212.  
  1213. CNMomentsTime -- Moments Evaluation with Time Weights
  1214. =====================================================
  1215.  
  1216. SYNOPSIS
  1217. --------
  1218.  
  1219.    `#include <CNCL/MomentsTime.h>'
  1220.  
  1221. TYPE
  1222. ----
  1223.  
  1224.    `CN_MOMENTSTIME'
  1225.  
  1226. * Menu:
  1227.  
  1228. BASE CLASSES
  1229. ------------
  1230. * CNStatistics::        Base Class of Statistic Classes
  1231.  
  1232. DERIVED CLASSES
  1233. ---------------
  1234.  
  1235. RELATED CLASSES
  1236. ---------------
  1237. * CNMoments::           Moments Evaluation
  1238.  
  1239. DESCRIPTION
  1240. -----------
  1241.  
  1242.    The `CNMomentsTime' class yields the moments of an time-weighted
  1243. input sequence:
  1244.  
  1245.    * mean,
  1246.  
  1247.    * variance and relative variance (squared coefficient of variation),
  1248.  
  1249.    * 2nd and 3rd zero moment,
  1250.  
  1251.    * 3rd central moment,
  1252.  
  1253.    * deviation and relative deviation (coefficient of variation),
  1254.  
  1255.    * skewness.
  1256.  
  1257.    When specifying an input value, you also have to specify the current
  1258. time. The time span from the last input to this input is used as the
  1259. input value's weight.
  1260.  
  1261.    Constructors:
  1262.  
  1263. `CNMomentsTime( CNParam *param )'
  1264. `CNMomentsTime( char *new_name = "no name" )'
  1265.      Initializes a `CNMomentsTime' evaluation with `new_name' as name
  1266.      of evaluation.
  1267.  
  1268.    In addition to the member functions required by CNCL and
  1269. `CNStatistics', `CNMomentsTime' provides:
  1270.  
  1271. `virtual void put( double x_i, CNSimTime put_time);'
  1272.      Input of a weighted value `x_i' for statistical evaluation. You
  1273.      also have to specify the current time. The time span from the last
  1274.      input to this input is used as the input value's weight.
  1275.  
  1276. `virtual double mean() const;'
  1277.      Returns mean of the input values.
  1278.  
  1279. `double variance() const;'
  1280.      Returns variance.
  1281.  
  1282. `double M_2() const;'
  1283.      Returns 2nd moment.
  1284.  
  1285. `double M_3() const;'
  1286.      Returns 3rd moment.
  1287.  
  1288. `double Z_3() const;'
  1289.      Returns 3rd central moment.
  1290.  
  1291. `double skewness() const;'
  1292.      Returns skewness.
  1293.  
  1294. `double relative_variance() const;'
  1295.      Returns relative variance (squared coefficient of variation).
  1296.  
  1297. `double relative_deviation() const;'
  1298.      Returns relative deviation (coefficient of variation).
  1299.  
  1300. 
  1301. File: cncl.info,  Node: CNLRE,  Next: CNDLRE,  Prev: CNMomentsTime,  Up: Evaluation
  1302.  
  1303. CNLREF, CNLREG -- Evaluation by LRE
  1304. ===================================
  1305.  
  1306. SYNOPSIS
  1307. --------
  1308.  
  1309.    `#include <CNCL/LREF.h>'        Distribution Function F(x)
  1310.  
  1311.    `#include <CNCL/LREG.h>'        Complementary Distribution Function
  1312. G(x)
  1313.  
  1314. TYPE
  1315. ----
  1316.  
  1317. `CN_LREF'
  1318. `CN_LREG'
  1319. * Menu:
  1320.  
  1321. BASE CLASSES
  1322. ------------
  1323. * CNStatistics::                Base Class of Statistic Classes
  1324. * CNLRE::                       LRE Base Class
  1325.  
  1326. DERIVED CLASSES
  1327. ---------------
  1328.  
  1329. RELATED CLASSES
  1330. ---------------
  1331. * CNDLRE::                 Discrete LRE
  1332.  
  1333. DESCRIPTION
  1334. -----------
  1335.  
  1336.    The `CNLREF' and `CNLREG' classes provide the statistical evaluation
  1337. of random sequences by the LRE algorithm. Results are the distribution
  1338. (d.f.) and the complementary distribution function (c.d.f.)
  1339. respectively, the local correlation coefficient, and the error of each
  1340. discovered point. The simulation run time is controlled by a predefined
  1341. maximum error  regarding to the local correlation of the input values.
  1342. For further information refer to "Effective Control of Simulation Runs
  1343. by a New Algorithm for Correlated Random Sequences" by F. Schreiber,
  1344. AEUe Vol. 42, pp. 347-354, 1988.
  1345.  
  1346.    Constructors:
  1347.  
  1348. `CNLREF( CNParam * param )'
  1349. `CNLREF( double MIN=0.01, double MAX=0.99, double MAX_ERR=0.05, int LEVEL=100,'
  1350. `Scale SCALE=CNLRE::LIN, int MAXSORT= 0, char* NAME = "no named", char* TEXT ="no text";)'
  1351. `'
  1352.      Initializes a `CNLREF' evaluation.
  1353.      Parameters:
  1354.     `MIN, MAX'
  1355.           limits of d.f. and c.d.f respectively
  1356.  
  1357.     `MAX_ERR'
  1358.           maximum error of d.f. and d.f respectively
  1359.  
  1360.     `LEVEL'
  1361.           number of levels
  1362.  
  1363.     `SCALE'
  1364.           scale of ordinate (`CNLRE::LIN' or `CNLRE::LOG')
  1365.  
  1366.     `MAXSORT'
  1367.           maximum size of an internal sort array
  1368.  
  1369.     `NAME'
  1370.           allows to name the evaluation.
  1371.  
  1372.     `TEXT'
  1373.           a short explanation of the evaluation.
  1374.  
  1375. `CNLREG( CNParam * param )'
  1376. `CNLREG( double MIN=0.01, double MAX=0.99, double MAX_ERR=0.05, int LEVEL=100, Scale SCALE=LIN, int MAXSORT= 0, char* NAME = "no name", char* TEXT = "no text")'
  1377.      Initializes a `CNLREG' evaluation. The parameters are the same as
  1378.      described above.
  1379.  
  1380.    In addition to the member functions required by CNCL and
  1381. `CNStatistics', `CNLREF' and `CNLREG' provide:
  1382.  
  1383. `void set_base(double b);'
  1384.      Set base for conditional probablity.
  1385.  
  1386. `void change_error(double ne);'
  1387.      Change desired error during simulation.
  1388.  
  1389. `long min_index() const;'
  1390. `long max_index() const;'
  1391.      Return start and end of result arrary. Should be used together with
  1392.      `get_result()' to acquire online evaluation during simulation.
  1393.  
  1394. `const CNLRE::resultline *get_result(long lev);'
  1395.      Can be used to acquire online (preliminary) results of the LRE[FG]
  1396.      during simulation. The parameter `lev' must be in the range
  1397.      `min_index' to `max_index'. A result line is a structs with the
  1398.      members `x', `vf' -- holds F- or G-value --, `rho', `sigrho', `d'
  1399.      -- the relative error -- and `nx' -- the number of exact hits of
  1400.      `x'.
  1401.  
  1402. `double cur_x_lev() const;'
  1403.      Returns the x-level currently calculated.
  1404.  
  1405. `double cur_f_lev();'
  1406. `double cur_g_lev();'
  1407.      These return the current F- resp. G-level in calculation.
  1408.  
  1409. 
  1410. File: cncl.info,  Node: CNDLRE,  Next: CNBatchMeans,  Prev: CNLRE,  Up: Evaluation
  1411.  
  1412. CNDLRE -- Evaluation by Discrete-LRE
  1413. ====================================
  1414.  
  1415. SYNOPSIS
  1416. --------
  1417.  
  1418.    `#include <CNCL/DLREF.h>'        Distribution Function F(x)
  1419.  
  1420.    `#include <CNCL/DLREG.h>'        Complementary Distr. Function G(x)
  1421.  
  1422.    `#include <CNCL/DLREP.h>'        Probability Function P(x)
  1423.  
  1424. TYPE
  1425. ----
  1426.  
  1427. `CN_DLREF'
  1428. `CN_DLREG'
  1429. `CN_DLREP'
  1430. * Menu:
  1431.  
  1432. BASE CLASSES
  1433. ------------
  1434. * CNStatistics::                Base Class of Statistic Classes
  1435. * CNDLRE::                      Base Class of Discrete LRE Methods
  1436.  
  1437. DERIVED CLASSES
  1438. ---------------
  1439.  
  1440. RELATED CLASSES
  1441. ---------------
  1442. * CNLRE::                       Limited Relative Error Method
  1443.  
  1444. DESCRIPTION
  1445. -----------
  1446.  
  1447.    The Discrete Limited Relative Error algorithm (DLRE or LRE III) is a
  1448. special LRE for evaluating discrete random variables. The possible
  1449. values must be known before the evalution is initialized, because F(x)
  1450. resp. G(x) or P(x) of each value will be estimated. So, the DLRE is not
  1451. a better histogramm with an error measure. The implementation is a
  1452. generalized version of the in ... described algorithm.
  1453.  
  1454.    If a test value does not agree with any x-interval, the following
  1455. warning is printed: `Warning: Wrong x value in DLRE[FGP]::put !'.
  1456.  
  1457.    Constructors:
  1458.  
  1459. `CNDLREF( CNParam * param );'
  1460. `CNDLREF( double XMIN, double XMAX, double INT_SIZE, double MAX_ERR, double PRE_FIRST = 0.0, char * NAME ="Without name", char * TEXT ="Without text", double Fmin = 0.0, unsigned long MAX_NRV = ULONG_MAX);'
  1461. `CNDLREF( double * XVALUES, long LEVEL, double MAX_ERR, double PRE_FIRST = 0.0, char * NAME ="Without name", char * TEXT ="Without text", double Fmin = 0.0, unsigned long MAX_NRV = ULONG_MAX);'
  1462.      Initializes a `CNDLREF' evaluation. There are two types of the
  1463.      initializing: The first constructor (second of the list above)
  1464.      should be used for equidistant x-values and the socond for
  1465.      non-equidistant x-values.
  1466.  
  1467.      Parameters:
  1468.     `XMIN, XMAX'
  1469.           Minimal and maximal x-values, whose F(x) resp. G(x) shall be
  1470.           estimated.
  1471.  
  1472.     `INT_SIZE'
  1473.           Size of an interval of the x-axis
  1474.  
  1475.     `XVALUES'
  1476.           Pointer to an array of doubles, which includes the x-values.
  1477.  
  1478.     `LEVEL'
  1479.           The number of array elements.
  1480.  
  1481.     `MAX_ERR'
  1482.           maximum error of d.f. and d.f respectively
  1483.  
  1484.     `PRE_FIRST'
  1485.           Predecessor of the first test value. That is necessary
  1486.           because of the correlation; you should not think about it too
  1487.           long, since a false value causes only a very small error in
  1488.           the measurement.
  1489.  
  1490.     `NAME'
  1491.           allows to name the evaluation.
  1492.  
  1493.     `TEXT'
  1494.           a short explanation of the evaluation.
  1495.  
  1496.     `Fmin'
  1497.           minimum F-level to stop the evaluation even when the proposed
  1498.           error criteria aren't fulfilled. (Default is 0.0).
  1499.  
  1500.     `MAX_NRV'
  1501.           The maximum number of test values allowed.
  1502.  
  1503. `CNDLREG( CNParam * param )'
  1504. `CNDLREG( double XMIN, double XMAX, double INT_SIZE, double MAX_ERR, double PRE_FIRST = 0.0, char * NAME = "Without name", char * TEXT = "Without text", double Gmin = 0.0, unsigned long MAX_NRV = ULONG_MAX);'
  1505. `CNDLREG( double * XVALUES, long LEVEL, double MAX_ERR, double PRE_FIRST = 0.0, char * NAME = "Without name", char * TEXT = "Without text", double Gmin = 0.0, unsigned long MAX_NRV = ULONG_MAX);'
  1506.      Initializes a `CNDLREG' evaluation. The parameters are as described
  1507.      above (except Gmin which replaces Fmin, of course).
  1508.  
  1509. `CNDLREP( CNParam * param )'
  1510. `CNDLREP( double XMIN, double XMAX, double INT_SIZE, double MAX_ERR, double PRE_FIRST = 0.0, char * NAME = "Without name", char * TEXT = "Without text", bool force_rminusa_ok = false, unsigned long MAX_NRV = ULONG_MAX);'
  1511. `CNDLREP( double * XVALUES, long LEVEL, double MAX_ERR, double PRE_FIRST = 0.0, char * NAME = "Without name", char * TEXT = "Without text", bool force_rminusa_ok = false, unsigned long MAX_NRV = ULONG_MAX);'
  1512.      Initializes a `CNDLREP' evaluation. The parameters are as described
  1513.      above. The new parameter `force_rminusa_ok' is used to force (hence
  1514.      the name) the large sample condition r-a >= 10. This condition
  1515.      cannot necessary be fulfilled by all kind of simulations, but most
  1516.      often it only results in a longer run time. To ensure the
  1517.      correctness of the results this option should be set TRUE whenever
  1518.      possible (default is FALSE).
  1519.  
  1520.    In addition to the member functions required by CNCL and
  1521. `CNStatistics', `CNDLREF', `CNDLREG' and `CNDLREP' provide:
  1522.  
  1523. `void set_base( double ba );'
  1524.      Used as factor for conditional probability.
  1525.  
  1526. `virtual void change_error( double err );'
  1527.      Change required realtive error during simulation.
  1528.  
  1529. `virtual double cur_x_lev();'
  1530.      Returns the first/last x-value whose relative error is higher than
  1531.      the required one.
  1532.  
  1533. `double cur_f_lev();'
  1534. `double cur_g_lev();'
  1535.      Indicates the currently evaluated F- resp. G-Level. This may show
  1536.      how far the evaluation has progressed.
  1537.  
  1538. `virtual long min_index();'
  1539. `virtual long max_index();'
  1540.      Return the lowest/highest index of the result array. These
  1541.      functions can be used in conjunction with the function
  1542.      `get_result()'.
  1543.  
  1544. `virtual const struct CNDLRE::resultline *get_result( long index );'
  1545.      Returns a single result line. The available fields are `x', `vf'
  1546.      -- holds F, G or P --, `rho' -- local correlation --, `sigrho',
  1547.      `d' -- the relative error -- and `nx' -- the absolut hits of x.
  1548.  
  1549. `virtual double f( double xt );'
  1550. `virtual double g( double xt );'
  1551. `virtual double p( double xt );'
  1552.      These functions return the actual calculated F-, G-, or P-Level
  1553.      for the supplied x-value.
  1554.  
  1555. 
  1556. File: cncl.info,  Node: CNBatchMeans,  Next: CNAVLTree,  Prev: CNDLRE,  Up: Evaluation
  1557.  
  1558. CNBatchMeans -- Evaluation by Batch Means
  1559. =========================================
  1560.  
  1561. SYNOPSIS
  1562. --------
  1563.  
  1564.    `#include <CNCL/BatchMeans.h>'
  1565.  
  1566. TYPE
  1567. ----
  1568.  
  1569.    `CN_BatchMeans'
  1570.  
  1571. * Menu:
  1572.  
  1573. BASE CLASSES
  1574. ------------
  1575. * CNStatistics::        Base Class for Statistic Evaluation
  1576.  
  1577. DERIVED CLASSES
  1578. ---------------
  1579.  
  1580. RELATED CLASSES
  1581. ---------------
  1582.  
  1583. DESCRIPTION
  1584. -----------
  1585.  
  1586.    The class `CNBatchMeans' provides the statistical evaluation of
  1587. random sequences by the Batch-Means method. Results are the
  1588. distribution (d.f.) and complementary distribution function (c.d.f.)
  1589. respectively, a histogram of relative frequencies, Bayes-error and
  1590. confidence intervals of each point of the d.f and the c.d.f.
  1591. respectively, and of the estimated mean and the variance of the group
  1592. means.
  1593.  
  1594.    The evaluation needs at least n * h values; n is the number of
  1595. batches and h the size of the batches if the constructor for fixed
  1596. length evaluation is used.  The evaluation is controlled by the
  1597. relative Bayes error of the estimated mean when the constructor for
  1598. variable length evaluation is used. For further information refer to
  1599. "Principles of Discrete Event Simulation" by G.S. Fishman, J. Wiley &
  1600. Sons, New York, 1978 and to "Improved Simulation by Application of the
  1601. Objetive Bayes-Statistics" by F. Schreiber, AEUE, Vol. 34, pp. 234-249,
  1602. 1980.
  1603.  
  1604.    Constructors:
  1605.  
  1606. `CNBatchMeans();'
  1607. `CNBatchMeans( CNParam *param );'
  1608. `CNBatchMeans( double bottom, double top, long intervals,'
  1609. `long size_of_groups, long no_of_groups, short conf = 95,'
  1610. `char *name = "no name", char *text = "no text" );'
  1611. `CNBatchMeans( double bottom, double top, long intervals,'
  1612. `long size_of_groups, double max_rel_err, short conf = 95,'
  1613. `char *name = "no name", char *text = "no text" );'
  1614.      Initializes a `CNBatchMeans' evaluation.The Parameters are:
  1615.     `bottom'
  1616.     `top'
  1617.           lower resp. upper limit of evaluated values; values beyond
  1618.           these limits are only counted;
  1619.  
  1620.     `Mmax_rel_err'
  1621.           defined maximum error for variable length evaluation
  1622.  
  1623.     `no_of_groups'
  1624.           number of groups (batches) for fixed length evaluation
  1625.  
  1626.     `size_of_groups'
  1627.           size of one group (batch)
  1628.  
  1629.     `intervals'
  1630.           number of intervals to use. The higher the interval number
  1631.           the finer is the resolution of the distribution function, but
  1632.           the bigger are the confidence intervals.
  1633.  
  1634.     `name, text'
  1635.           a name and a descriptive text to use for the evaluation
  1636.  
  1637.    In addition to the member functions required by CNCL and
  1638. `CNStatistics', `CNBatchMeans' provides:
  1639.  
  1640. `double bayes_err() const;'
  1641.      Returns the relative Bayes error of the mean.
  1642.  
  1643. `double sigma() const;'
  1644.      Returns the deviation of the group means; can also be used as an
  1645.      error measure of the mean, e.g. its relative Bayes error.
  1646.  
  1647. `double mean_confidence() const;'
  1648.      Returns the confidence interval of the mean.
  1649.  
  1650. `long min_index() const;'
  1651. `long max_index() const;'
  1652.      Return min and max interval number (maps to one line of output of
  1653.      the print function).
  1654.  
  1655. `long groups_done() const;'
  1656.      Returns the number of evaluated groups (batches). Can be used as a
  1657.      progress report.
  1658.  
  1659. `const struct CNBatchMeans::resultline *get_result(long index);'
  1660.      Returns one line of the result (as output by print). The range for
  1661.      index is min_index <= index <= max_index. The fields of the struct
  1662.      resultline are x, fx -- d.f., gx -- c.d.f., rh -- rel. probability
  1663.      of x, ferr, gerr -- bayes error of d.f. resp. c.d.f., fconf, gconf
  1664.      -- confidence interval.
  1665.  
  1666. `void change_error(double ne);'
  1667.      Allows to change the maximum relative error during evaluation.
  1668.  
  1669. `double p(double x) const;'
  1670. `double f(double x) const;'
  1671. `double g(double x) const;'
  1672.      Return probability, value of distribution function or value of
  1673.      complementary distribution function associated with the interval x
  1674.      belongs to.
  1675.  
  1676. `double correlation() const;'
  1677.      Returns the 1st order correlation coefficient of the batch means.
  1678.      It should be nearly 0 in order to trust the evaluation results.
  1679.  
  1680. `virtual void print( Type type = CNStatistics::DF, ostream &strm = cout ) const;'
  1681.      The first argument chooses between the output of d.f
  1682.      (`CNStatistics::DF', default) and c.d.f. (`CNStatistics::CDF'), the
  1683.      second is an user defined output stream.
  1684.  
  1685. 
  1686. File: cncl.info,  Node: Container,  Next: Events,  Prev: Evaluation,  Up: Top
  1687.  
  1688. Container Classes
  1689. *****************
  1690.  
  1691.    CNCL's hierarchical concept and the runtime type information make it
  1692. possible to provide generic containers, i.e. container that can contain
  1693. any object. CNCL generic containers classes work with pointers to
  1694. `CNObject', a class with which all classes in the CNCL hierarchy are
  1695. type-compatible.
  1696.  
  1697. * Menu:
  1698.  
  1699. Doubly Linked List
  1700. ------------------
  1701. * CNAVLTree::           AVL balanced binary search tree
  1702. * CNAVLNode::           Node of AVL tree
  1703. * CNSLList::        Single Linked List of Objects
  1704. * CNSLObject::        Node of Single Linked List
  1705. * CNSLIterator::    Iterator of Single Linked List
  1706. * CNDLList::        Doubly Linked List of Objects
  1707. * CNDLObject::        Node of Doubly Linked List
  1708. * CNDLIterator::    Iterator of Doubly Linked List
  1709. * CNQueue::        Abstract Queue Base Class
  1710. * CNQueueFIFO::        FIFO Queue
  1711. * CNQueueLIFO::        LIFO Queue
  1712. * CNQueueRandom::    Random Queue
  1713. * CNQueueSPT::        SPT Queuecontainer
  1714. * CNPrioQueueFIFO::    Priority Queue
  1715. * CNJob::        Standard Job for Queues
  1716. * CNSink::        Sink
  1717. * CNStack::        Stack
  1718.  
  1719. 
  1720. File: cncl.info,  Node: CNAVLTree,  Next: CNAVLNode,  Prev: CNBatchMeans,  Up: Container
  1721.  
  1722. CNAVLTree -- AVL balanced binary search tree
  1723. ============================================
  1724.  
  1725. SYNOPSIS
  1726. --------
  1727.  
  1728.    `#include <CNCL/AVLTree.h>'
  1729.  
  1730. TYPE
  1731. ----
  1732.  
  1733.    `CN_CNAVLTREE'
  1734.  
  1735. * Menu:
  1736.  
  1737. BASE CLASSES
  1738. ------------
  1739. * CNObject::        Root of the CNCL Hierarchy
  1740.  
  1741. DERIVED CLASSES
  1742. ---------------
  1743. none
  1744.  
  1745. RELATED CLASSES
  1746. ---------------
  1747. * CNAVLNode::           Node for AVL tree
  1748.  
  1749. DESCRIPTION
  1750. -----------
  1751.  
  1752.    `CNAVLTree' is realizing a generic AVL tree. It contains nodes
  1753. derived from `CNAVLNode' and organizes them in a balanced binary search
  1754. tree. Such Nodes can be added to the tree, searched for and be removed.
  1755.  
  1756.    `CNAVLTree' is an abstract base class. It provides the general
  1757. algorithms needed for AVL trees, but it makes no assumptions on what
  1758. kind of key the nodes will be sorted by. Usable AVL trees require
  1759. derived classes that specify the key that will be used.
  1760.  
  1761.    Constructors:
  1762.  
  1763. `CNAVLTree();'
  1764. `CNAVLTree(CNParam *param);'
  1765.      Initializes an empty AVL tree.
  1766.  
  1767.    Destructor:
  1768.  
  1769. `~CNAVLTree();'
  1770.      Deletes the tree and all `CNAVLNode' nodes still in the tree.
  1771.  
  1772.    In addition to the member functions required by CNCL, `CNAVLTree'
  1773. provides:
  1774.  
  1775. `bool add(CNAVLNode*);'
  1776.      Adds a node to the tree. If the key the node is sorted by is
  1777.      already existing in the current AVL tree, `FALSE' is returned.
  1778.      otherwise `TRUE' is returned.
  1779.  
  1780. `CNAVLNode *find();'
  1781.      Searches for a key. This is an abstract functions that may only be
  1782.      called by subclasses of `CNAVLTree'. The subclasses have to provide
  1783.      new `find()' functions that manage the key to search for.  Returns
  1784.      a pointer to the found `CNAVLNode' on success and `NIL' on failure
  1785.      (key not found).
  1786.  
  1787. `CNAVLNode *remove();'
  1788.      Similar to `find()', but the returned node is also removed from the
  1789.      tree.
  1790.  
  1791. `bool empty();'
  1792.      Returns `TRUE' if the tree is empty.
  1793.  
  1794. `void delete_all();'
  1795.      Deletes all nodes still in the tree.
  1796.  
  1797. `CNAVLNode *find_first();'
  1798.      Returns a pointer to the first node in the tree, i.e. the node
  1799.      with the lowest key. Returns `NIL' if the tree is empty.
  1800.  
  1801. `CNAVLNode *remove_first();'
  1802.      Similar to `find_first()', but also removes the returned node.
  1803.  
  1804. `CNAVLNode *get_root();'
  1805.      Returns the root node of the tree or `NIL' is the tree is empty.
  1806.  
  1807. `unsigned long length() const;'
  1808.      Returns the number of nodes in the tree.
  1809.  
  1810.    The following example shows parts of a derived class. It uses simple
  1811. `long' keys to sort and find nodes. See also the example for
  1812. `CNAVLNode'.
  1813.  
  1814.      class IntAVLTree : public CNAVLTree
  1815.      {
  1816.          friend class IntAVLNode;
  1817.      
  1818.        // ...
  1819.      
  1820.        public:    /***** Public interface **************************************/
  1821.      
  1822.          virtual CNAVLNode *find(long key);
  1823.          virtual CNAVLNode *remove(long key);
  1824.      
  1825.        private:    /***** Internal private members ******************************/
  1826.      
  1827.          long searchkey;
  1828.      
  1829.        // ...
  1830.      };
  1831.      
  1832.      // ...
  1833.      
  1834.      CNAVLNode *IntAVLTree::find(long key) {
  1835.          searchkey = key;
  1836.          return CNAVLTree::find();
  1837.      };
  1838.      
  1839.      CNAVLNode *IntAVLTree::remove(long key) {
  1840.          searchkey = key;
  1841.          return CNAVLTree::remove();
  1842.      };
  1843.  
  1844. 
  1845. File: cncl.info,  Node: CNAVLNode,  Next: CNSLList,  Prev: CNAVLTree,  Up: Container
  1846.  
  1847. CNAVLNode -- Node for CNAVLTree
  1848. ===============================
  1849.  
  1850. SYNOPSIS
  1851. --------
  1852.  
  1853.    `#include <CNCL/AVLNode.h>'
  1854.  
  1855. TYPE
  1856. ----
  1857.  
  1858.    `CN_AVLNODE'
  1859.  
  1860. * Menu:
  1861.  
  1862. BASE CLASSES
  1863. ------------
  1864. * CNObject::        Root of the CNCL Hierarchy
  1865.  
  1866.  
  1867. DERIVED CLASSES
  1868. ---------------
  1869. none
  1870.  
  1871. RELATED CLASSES
  1872. ---------------
  1873. * CNAVLTree::           AVL balanced binary search tree
  1874.  
  1875. DESCRIPTION
  1876. -----------
  1877.  
  1878.    `CNAVLNode' is an abstract base class for nodes of AVL trees.
  1879.  
  1880.    Derived classes must be implemented for different key types. They
  1881. must be able to compare their keys between two node and between a node
  1882. and the serached key of the tree.
  1883.  
  1884.    Constructors:
  1885.  
  1886. `CNAVLNode();'
  1887. `CNAVLNode(CNParam *param);'
  1888.      Initializes a new AVL node.
  1889.  
  1890.    In addition to the member functions required by CNCL, `CNAVLNode'
  1891. provides:
  1892.  
  1893. `virtual int compare(CNAVLNode*) = 0;'
  1894.      Compares the node's key with another node's key. Returns `-1' if
  1895.      the current node's key is lower, `1' of it's higher and `0' if
  1896.      it's equal to the other node's key.
  1897.  
  1898. `virtual int find(CNAVLTree*) = 0;'
  1899.      Compares the node's key with the current search key. Returns `-1'
  1900.      if the current node's key is lower, `1' of it's higher and `0' if
  1901.      it's equal to the searched key.
  1902.  
  1903.      Derived tree classes must provide a possibility for nodes to get
  1904.      the currently searched tree key, e.g. as a member variable in the
  1905.      tree structure.
  1906.  
  1907. `CNAVLNode *left();'
  1908.      Returns the root of the left sub-tree (lower keys) or `NIL' if
  1909.      there is no left sub-tree.
  1910.  
  1911. `CNAVLNode *right();'
  1912.      Returns the root of the right sub-tree (higher keys) or `NIL' if
  1913.      there is no right sub-tree.
  1914.  
  1915.    The following example shows parts of a derived class. It uses simple
  1916. `long' keys to sort and find nodes. See also the example for
  1917. `CNAVLTree'.
  1918.  
  1919.      class IntAVLNode : public CNAVLNode
  1920.      {
  1921.        public:    /***** Constructors ******************************************/
  1922.      
  1923.          IntAVLNode(long key): key_(key) {};
  1924.      
  1925.        public:    /***** Public interface **************************************/
  1926.      
  1927.          virtual int compare(CNAVLNode*); // compare node with another one
  1928.          virtual int find(CNAVLTree*);    // compare node with searched key
  1929.          long get_key() { return key_; };
  1930.      
  1931.        private:    /***** Internal private members ******************************/
  1932.      
  1933.          long key_;
  1934.      
  1935.        // ...
  1936.      
  1937.      };
  1938.      
  1939.      // ...
  1940.      
  1941.      int IntAVLNode::compare(CNAVLNode *n) {
  1942.          long c = IntAVLNode::cast_from_object(n)->key_;
  1943.          if (key_ < c) return -1;
  1944.          if (key_ > c) return  1;
  1945.          return 0;
  1946.      };
  1947.      
  1948.      int IntAVLNode::find(CNAVLTree *t) {
  1949.          long c = IntAVLTree::cast_from_object(t)->searchkey;
  1950.          if (key_ < c) return -1;
  1951.          if (key_ > c) return  1;
  1952.          return 0;
  1953.      };
  1954.  
  1955.